home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 08 - 1992 / 08.02 Jun 92 / Generic Virus Detection / BMDec.h next >
Encoding:
C/C++ Source or Header  |  1992-05-26  |  1.1 KB  |  47 lines  |  [TEXT/MPS ]

  1. /* bmdec.h - definitions and declarations for bm */
  2.  
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <stdlib.h>
  6. #include <console.h>
  7.  
  8. #define TABS            4
  9.  
  10. #define K            1024
  11. #define MAXSIZE        8*K
  12. #define MAXINT        32767
  13. #define MINSUB        8
  14. #define MAXSUB        12
  15. #define STEP            4
  16. #define ITERATIONS        1000
  17.  
  18. #define FALSE            0
  19. #define TRUE            1
  20.  
  21. #define READ_MODE        "r"
  22. #define WRITE_MODE        "w"
  23. #define APPEND_MODE        "a"
  24.  
  25. #define MIN2(a, b)    (((a) < (b)) ? (a) : (b))
  26. #define MIN3(a, b, c)    ((MIN2((a), (b)) < (c)) ? MIN2((a), (b)) : (c))
  27. #define MAX2(a, b)    (((a) > (b)) ? (a) : (b))
  28.  
  29. #define POSITIVE(a)    ((abs(a) == (a)) ? (a) : abs(a)+127)
  30.  
  31. #define CHARS            256
  32.  
  33. #define NIL_POINTER        0L
  34. #define NIL_STRING        "\p"
  35. #define IGNORED_STRING    NIL_STRING
  36. #define NIL_FILE_FILTER     NIL_POINTER
  37. #define NIL_DIALOG_HOOK     NIL_POINTER
  38. #define VDAT_RES_ID        0
  39.  
  40. typedef int ALPHABET_ARRAY[CHARS];
  41. typedef int **INDEX_ARRAY;
  42. typedef ResType **ResTypeHandle;
  43.  
  44. void compare(), allocate_array(), compute_jumps(), compute_match_jumps(), error_message(), exit_cleanly(), main();
  45. char open_file(), random_string();
  46. int read_array();
  47.